<% match = match_tr %>
<tr id="<%= dom_id match %>">
<td>
<%= match.id %>
</td>
<td align="center">
<p><%= image_tag(match.home_team.pic) %></p>
<p><%= match.home_team.name %></p>
<p><%= point_spread match,match.home_team %></p>
<p>bets: <%= match.bets.home.count%></p>
</td>
<td align="center">
<p><%= image_tag(match.away_team.pic) %></p>
<p><%= match.away_team.name %></p>
<p><%= point_spread match,match.away_team %></p>
<p>bets: <%= match.bets.away.count%></p>
</td>
<td>
<% if match.played? %>
winner: <%= match.winner.name if match.winner %>
<% else %>
<%= format_time match.begin_at %>
<% end %>
</td>
<td>
<%= link_to "edit",edit_admin_match_path(match) %>
<%= link_to "delete",admin_match_path(match),:method=>:delete,:confirm=>"are you sure?" %>
<%= link_to "play",play_admin_match_path(match) unless match.played? %>
</td>
</tr>
